#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "dtk_score.h"
#include "dtk_debug.h"

DTKScore* dtk_score_create()
{
    DTKScore* score;

    score = (DTKScore*) malloc (sizeof(DTKScore));
    memset (score, 0, sizeof (DTKScore));

    return score;
}

void dtk_score_release (DTKScore* self)
{
    if (self == NULL)
    {
        return;
    }
    free (self);
    return;
}

void dtk_score_set_loop (DTKScore* self, DBoolean loop)
{
    DTK_ASSERT (self != NULL);

    self->loop = loop;
    return;
}

DBoolean dtk_score_get_loop(DTKScore * self)
{
    DTK_ASSERT (self != NULL);    
    return self->loop;
}

void dtk_score_start (DTKScore* self)
{
    DTK_ASSERT (self != NULL);

    
    self->is_playing = DTK_TRUE;
    self->is_paused = DTK_FALSE;
    return;
}

void dtk_score_pause (DTKScore* self)
{
    DTK_ASSERT (self != NULL);

    self->is_paused = DTK_TRUE;
    return;
}

void dtk_score_stop (DTKScore* self)
{
    DTK_ASSERT (self != NULL);
    self->is_playing = DTK_FALSE;
    return;
}

void dtk_score_rewind (DTKScore* self)
{
    DTK_ASSERT (self != NULL);
    return;
}

DBoolean dtk_score_is_playing (DTKScore* self)
{
    DTK_ASSERT (self != NULL);
    return self->is_playing;
}

void dtk_score_append(DTKScore* self, DTKTimeLine* timeline)
{
    return;
}
